package com.bajiao.mapper.order;

import com.bajiao.entity.order.CouponOrder;
import com.bajiao.vo.order.CouponOrderAdmin;
import com.bajiao.vo.order.CouponOrderDetailsResponse;
import com.bajiao.vo.order.CouponOrderResponse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Description: 优惠券订单
 * @Author: FanJq
 * @Date:   2024-12-14
 * @Version: V1.0
 */
public interface CouponOrderMapper extends BaseMapper<CouponOrder> {

    /**
     * @Description
     * 订单分页列表
     * @date 2024/12/18 18:10
     * @author FanJq
     * @param userId
     * @param status
     * @return {@link List< CouponOrderResponse>}
    */
    List<CouponOrderResponse> getOrderPage(@Param("userId") String userId,
                                           @Param("status") Integer status);

    /**
     * @Description
     *
     * @date 2024/12/20 15:53
     * @author FanJq
     * @param userId
     * @param orderNo
     * @return {@link CouponOrderDetailsResponse}
    */
    CouponOrderDetailsResponse getDetails(@Param("userId") String userId,
                                          @Param("orderNo") String orderNo);

    /**
     * @Description
     * 管理后台列表
     * @date 2025/1/8 11:02
     * @author FanJq
     * @param orderNo
     * @param keywords
     * @param title
     * @param status
     * @param createTimeBegin
     * @param createTimeEnd
     * @return {@link List< CouponOrderAdmin>}
    */
    List<CouponOrderAdmin> getAdminList(String orderNo, String keywords, String title, Integer status, String createTimeBegin, String createTimeEnd);

    /**
     * @Description
     * 订单统计
     * @date 2025/2/12 14:04
     * @author FanJq
     * @param
     * @return {@link Map< String, Object>}
    */
    Map<String, Object> getOrderStat();
}
